import { defineStore } from "pinia";

export const useSettingStore = defineStore(
  "settingStore",
  () => {
    const setting: any = ref();

    function setSetting(value: any) {
      setting.value = { ...setting.value, ...value };
    }

    function resetSetting() {
      setting.value = null;
    }

    return { setting, setSetting, resetSetting };
  },
  {
    persist: true,
  }
);
